package com.rephilo.dubbo.filter.model;

/**
 * 执行时间统计实体
 *
 * @author wangxiao15
 */
public class TimeMonitor {
    private Long startTime;

    private Long endTime;

    private Long excuteTime;

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public Long getExcuteTime() {
        return excuteTime;
    }

    public void setExcuteTime(Long excuteTime) {
        this.excuteTime = excuteTime;
    }

    public TimeMonitor(Long startTime, Long endTime) {
        this.startTime = startTime;
        this.endTime = endTime;
        this.excuteTime = endTime - startTime;
    }

    @Override
    public String toString() {
        return "TimeMonitor{" +
                "startTime=" + startTime +
                ", endTime=" + endTime +
                ", excuteTime=" + excuteTime +
                '}';
    }
}
